Abstract Graphical Data Type
   HOME

TheInfoList



OR:

An abstract graphical data type (AGDT) is an extension of an
abstract data type In computer science, an abstract data type (ADT) is a mathematical model for data types, defined by its behavior (semantics) from the point of view of a '' user'' of the data, specifically in terms of possible values, possible operations on data ...
for
computer graphics Computer graphics deals with generating images and art with the aid of computers. Computer graphics is a core technology in digital photography, film, video games, digital art, cell phone and computer displays, and many specialized applications. ...
. AGDTs provide the advantages of the ADTs with facilities to build graphical objects in a structured way. Formally, an AGDT may be defined as a "class of graphical objects whose logical behavior is defined by a set of graphical characteristics and a set of graphical operations". AGDTs were introduced in 1979 by
Nadia Magnenat Thalmann Nadia Magnenat Thalmann is a computer graphics scientist and robotician and is the founder and head of MIRALab at the University of Geneva. She has chaired the Institute for Media Innovation at Nanyang Technological University (NTU), Singapore ...
and Daniel Thalmann. The most important tool in this graphical extension is the 3-D graphical type—the figure type. The syntax is described in Figure 2. The word "figure" is a keyword. The formal parameter section, the declaration, and the body are similar to the corresponding elements in a procedure. To define a figure type, one must # find the characteristics of the figure, which become the parameters; # find the algorithm that allows the user to build the figure with the help of the parameters. To build the figures, typical graphical statements should be used like: moveabs, moverel, lineabs, and linerel to draw vectors, and include to define an existing figure as part of a new one. For example, a
pyramid A pyramid () is a structure whose visible surfaces are triangular in broad outline and converge toward the top, making the appearance roughly a pyramid in the geometric sense. The base of a pyramid can be of any polygon shape, such as trian ...
with four vertices can be defined as
type PYRAMID = figure (A, B, C, D: VECTOR);
begin
moveabs A; lineabs B, C, A, D, C;
moveabs B; lineabs D
end;
A
tree In botany, a tree is a perennial plant with an elongated stem, or trunk, usually supporting branches and leaves. In some usages, the definition of a tree may be narrower, e.g., including only woody plants with secondary growth, only ...
can be defined by 3-D graphical types as
type TREE = figure (var BRANCHES: TEXT; NBRANCHES: INTEGER;
POSITION: VECTOR; HEIGHT, LENGTH:REAL);
where BRANCHES is a file of kinds of branches, NBRANCHES is the number of branches, POSITION is the position of the trunk, HEIGHT is the height of the trunk, and LENGTH is the length of the branches. A forest of trees can be defined as
var FOREST: array  ..NBTREESof TREE
Abstract graphical types have been implemented as an extension of the
PASCAL programming language Pascal is an imperative and procedural programming language, designed by Niklaus Wirth as a small, efficient language intended to encourage good programming practices using structured programming and data structuring. It is named after French ...
called MIRA-3D.N. Magnenat-Thalmann, D. Thalmann,
MIRA-3D: A Three-dimensional Graphical Extension of PASCAL
Software-Practice and Experience, Vol.13, 1983, pp.797-808


References

{{Reflist Data types